package com.ap.core.validation.message.rules;

import com.ap.core.cxf.jaxb.managertp.SubmitRTPMessageType;
import com.ap.core.message.managertp.info.SubmitRTPMessageInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.OriginalInfo;
import com.ap.core.validation.rules.AbstractValidationRule;

/**
 * User: Gibu.Paul
 * merchantURL must be provided where the message Type is SUBMITRTPFORMOB
 */
public class IF0013Rule	extends 
                        AbstractValidationRule<MessageValidationInfo<SubmitRTPMessageInfo, OriginalInfo>> {

	@Override
	public boolean validate(
			MessageValidationInfo<SubmitRTPMessageInfo, OriginalInfo> infoObject) {
		final SubmitRTPMessageInfo submitRTPMessageInfo = infoObject
				.getBoundObject();

		SubmitRTPMessageType messageType = submitRTPMessageInfo.getMsgHdr().getMsgType();
		String  merchantURL = submitRTPMessageInfo.getRTPSenderInfo().getDetailMerchantInfo().getMerchantInfo().getMerchantRtnStrng();

		return (null != merchantURL) ;
		
	}

}